const { addLessLoader, override, overrideDevServer } = require('customize-cra')

const devServerConfig = (config) => {
  return {
    ...config,
    proxy: {
      '/user': {
        target: 'http://localhost:3001',
        changeOrigin: true
      }
    }
  }
}

module.exports = {
  webpack: override(
    addLessLoader({
      strictMath: true,
      noIeCompat: true
    })
  ),
  devServer: overrideDevServer(devServerConfig)
}
